package com.cloudkinto.service.stock;

import com.cloudkinto.entity.StockLogDo;
import com.baomidou.mybatisplus.extension.service.IService;

import com.cloudkinto.common.web.PageResult;
import com.cloudkinto.common.web.SingleResult;
import com.cloudkinto.service.stock.vo.log.StockLogPageRes;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  service接口
 * </p>
 * @author 张永远
 * @since 2020-06-10
 */
public interface StockLogService extends IService<StockLogDo> {

    SingleResult pageInit(Long c,Long u);


    PageResult getListPage(Map<String, String> map);

    List<StockLogPageRes> getList(Map<String, String> map);

//    boolean saveAutoSendOutLog(Long productId, Long shopId, Long storageId, int receiveCount, int canSellCount, Long companyId, String orderInputNumber);

    boolean saveAutoSendOutLog(Long productId, Long shopId, Long storageId, int count, int canSellCount, Long companyId, String orderInputNumber, Long userid);

    boolean saveAutoSendOutLog(Integer status, Long productId, Long shopId, Long storageId, int count, Integer afterCount, Long companyId, Long userId, String orderNo);

    boolean saveAutoSendOutLog(Integer status, Long productId, Long shopId, Long storageId, int count, Integer afterCount, Long companyId, Long userId, String orderNo, Long flowingId);

    int selectInCount(Long storageId, Long shopId, Long productInfoId, String commoditySku, int beforeDays);

    SingleResult<List<StockLogPageRes>> listPageLast10(Map<String, String> map);

    String exportExcel(Map<String, String> map, String fileName) throws IOException;

    PageResult<List<StockLogPageRes>> getAPIListPage(Map<String, String> map);

    StockLogDo getInputTimeAndCount(Long shopId, Long storageId, Long companyId, String commoditySku, Integer count);
}
